/*
 * 0912346028
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package flight;
import flight.model.*;
import java.io.FileNotFoundException;
import java.io.File;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
 *
 * @author tam
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            // TODO code application logic here
            String currentDir = new File(".").getAbsolutePath();
            System.out.println(currentDir);
            FlightDataSource ds = new FlightTextDataSource("flights.txt");
            List<Flight> flights = ds.getAll();
            for(Flight f: flights){
                System.out.println(f);
            }
            
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

}
